﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WebFrontEnd.Helpers
{
    public static class GuestExtensions
    {
        public static string CombinedName(this BusinessEntities.Model.Guest guest)
        {
            if (guest.Couple)
            {
                return guest.MaleFirstName + " & " + guest.FemaleFirstName + " " + guest.LastName;
            }
            else if (guest.MaleFirstName != null)
            {
                return guest.MaleFirstName + " " + guest.LastName;
            }
            else
            {
                return guest.FemaleFirstName + " " + guest.LastName;
            }
            
        }
    }
}